-
-
Notifications
You must be signed in to change notification settings - Fork 195
London | ITP-May-2025 | Surafel Workneh | Structuring and testing data | Coursework/sprint 1 #646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…gnment sprint -1 of 1-count.js
…m number generation in sprint -1 of 4-random.js
…'let' in sprint -1 of 1.js
…licing in sprint -1 of 3.js
…ons in sprint -1 of 4.js
…reassignment in percentage change calculation
…sprint -1 of 2-time-format.js
and describe the purpose in sprint -1 of 3-to-pounds.js
… sprint -1 of chrome.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The checkboxes in the PR descriptions are not in proper markdown syntax. Can you fix their markdown syntax? (I fixed one of them for you so that you can follow the example).
filePath | ||
.slice(lastSlashIndex + 1) | ||
.split(".") | ||
.pop(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are these code for? They are not doing anything.
.padStart(2, "0")}`; | ||
} | ||
console.log(convertTo12HourClockTime(twentyFourHourClockTime)); // Output: "08:53 PM" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice implementation! I don't think this statement outputs exactly "08:53 PM".
// b) Run the code and identify the line where the error is coming from - why is this error occurring? How can you fix this problem? | ||
// There are no errors in the code. The code runs successfully and calculates the percentage change in car price without any issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably have fixed the error before answering question (b)
// 1. const penceString = "399p": initialize a string variable with the value "399p" | ||
//2. Removes the trailing "p" from the string: and result will be 399 | ||
//3. Ensures the number has at least 3 digits by padding from the left with zeros: like 000 | ||
//4. Extracts the pound portion: "3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we expect this program to work as intended for any valid penceString
if we deleted .padEnd(2, "0")
(line 16) from the code?
In other words, do we really need .padEnd(2, "0")
in this script?
What is the return value of `prompt`? | ||
surafel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the question is asking, in general, what does prompt()
return when a user clicks "OK" and when a user clicks "Cancel".
Learners, PR Template
Self checklist
[x] I have titled my PR with REGION | COHORT_NAME | FIRST_NAME LAST_NAME | PROJ_NAME
[x] I have tested my changes
[x] My changes follow the style guide
[x] My changes meet the requirements of this task
Changelist
Briefly explain my PR.
Function Parameter and Return Handling
String Manipulation and Formatting
Time Conversion Logic
Testing and Debugging
Questions
Ask any questions you have for your reviewer.